package com.gdou.crrp.repository;

import com.gdou.crrp.entity.TopicCollect;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TopicCollectRepository extends JpaRepository<TopicCollect, Integer> {

    @Transactional
    void deleteByTidAndUid(Integer tid, Integer uid);

    List<TopicCollect> findAllByUid(Integer uid);

    TopicCollect findByTidAndUid(Integer tid, Integer uid);
}
